package theOrbalEra.client.gui;

import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;

import org.lwjgl.opengl.GL11;

import theOrbalEra.common.util.DefultValue;

public class GuiButtonQuatzExchangeNext extends GuiButton {
	 /**
     * True for pointing right (next page), false for pointing left (previous page).
     */
    private final boolean IsNext;
    public GuiButtonQuatzExchangeNext(int par1, int par2, int par3, boolean par4)
    {
        super(par1, par2, par3, 15, 10, "");
        this.IsNext = par4;
    }

    /**
     * Draws this button to the screen.
     */
    public void drawButton(Minecraft par1Minecraft, int par2, int par3)
    {
        if (this.drawButton)
        {
            boolean ISSuspend = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
            par1Minecraft.renderEngine.bindTexture(DefultValue.Gui_ButtonQuatzExchangeNext);
            int XPos = 178;
            int YPos = 1;
            if(!this.enabled){
            	YPos+=24;
            }
            else{
            if (ISSuspend)
            {
                YPos += 12;
            }

           
            }
            if (this.IsNext)
            {
                XPos += 19;
            }

            this.drawTexturedModalRect(this.xPosition, this.yPosition, XPos, YPos, 15, 10);
        }
    }
}
